package cn.lcsjsxy.yxc.miscellaneous;

public class Triangle {
    public static void main(String[] args) {
        T T1 =new T();
        T1.h=3;
        T1.x=4;
        System.out.println(T1.a());
    }
}

class T{  //包含三角形属性和方法的类
    double x;  //底
    double h;  //高

    public  double a(){  //处理三角形面积的方法
        return x*h/2.0;
    }
}
